package com.chiao.service.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chiao.dao.admin.RoleDao;
import com.chiao.entity.admin.Role;

@Service
public class RoleService {

	@Autowired RoleDao roleDao;
	
	public List<Role> listRole(){
		return roleDao.listRole();
	}

	public long addRole(Role r) {
		return roleDao.addRole(r);
	}

	public int deleteRole(int id) {
		return roleDao.deleteRole(id);
	}

	public int updateRole(Role r) {
		return roleDao.updateRole(r);
	}
}
